package com.alexrnl.BetaSeriesFileManager.API.entities;

import java.util.logging.Logger;

/**
 * @author Alex
 * 
 */
public class BetaSeriesAPIError {
	private static Logger	T	= Logger.getLogger(BetaSeriesAPIError.class.getName());

	/**
	 * Enumeration representing the category of an error.
	 * @author Alex
	 */
	public enum Category {
		/**
		 * An API error
		 */
		API_ERROR (1, "API error"),
		/**
		 * A user error
		 */
		USER_ERROR (2, "User error"),
		/**
		 * A variable error
		 */
		VARIABLE_ERROR (3, "Variable error"),
		/**
		 * A database error
		 */
		DATABASE_ERROR (4, "Database error");

		private final int		id;
		private final String	description;

		private Category (final int id, final String description) {
			this.id = id;
			this.description = description;
		}

		/**
		 * The number that identify the category.
		 * @return the id of the category.
		 */
		public int getId () {
			return id;
		}

		/**
		 * The description of the category.
		 * @return the description of the category.
		 */
		public String getDescription () {
			return description;
		}

	}

	private int code;
	private Category category;
	private String content;
}
